<template>
  <basic-container>
    <avue-crud
        v-if="tableOption"
        v-bind="bindVal"
        v-on="onEvent"
        v-model:page="page"
        v-model="startForm">
      <template #menu="{type,size,row}" slot="menuBtn">
        <el-button icon="el-icon-edit" link :size="size" @click.native="handlerTask(row)" :type="type">处理任务
        </el-button>
      </template>
    </avue-crud>
    <start-act-task-user-handler ref="userHandlerTask" @refresh="refreshChange"></start-act-task-user-handler>
  </basic-container>
</template>

<script>
import {createDynamicMixin} from "@/mixins/startCrud.js"
import startActTaskUserHandler from "../components/startActTaskUserHandler.vue";
import autoRouter from "@/views/start/activiti/autoRouter";

const option = {
  name: "start/activiti/userTask",
  optionPath: 'start/activiti/my/myActTask',
  apiPath: 'start/activiti/core/startMyActTask',
  list: "pageMyWaitAuthTask"
}
export default {
  name: "myNeedToBeDealtWith",
  mixins: [createDynamicMixin(option)],
  label: "待处理",
  components: {
    startActTaskUserHandler
  },
  methods: {
    handlerTask(row) {
      this.$router.push({path: autoRouter.paths.authPath + "/" + row.curTaskInstId})
    },
    beforeLoadDataSource(search) {
      search.start_order_createTime = "desc"
    }


  }
}
</script>

<style scoped>

</style>
